{include file="./public/footer" /}
{include file="./public/menu" /}
<!--/sidebar-->
<div class="main-wrap">

    <div class="crumb-wrap">
        <div class="crumb-list"><i class="icon-font"></i><a href="/admin.php">首页</a>
            <span class="crumb-step">&gt;</span><span class="crumb-name">机票管理</span></div>
    </div>
    <div class="search-wrap">
        <div class="search-content">
        </div>
    </div>
    <div class="result-wrap">
        <form  id="andy_sort">
            <div class="result-title">
                <div class="result-list">
                    <button type="button" id="button_add" ><i class="icon-font"></i>新增机票</button>
                    <button type="button" id="button_sort"><i class="icon-font"></i>更新排序</button>
                    <button type="button" id="button"><i class="icon-font">★</i>查看航线</button>
                </div>
            </div>
            <div class="result-content">
                <table class="result-tab" width="100%">
                    <tr >
                        <th>排序</th>
                        <th>ID</th>
                        <th>所属航线</th>
                        <th>日期</th>
                        <th>价格</th>
                        <th>操作</th>
                    </tr>
                    {volist name="res" id="r"}
                        <tr style="text-align: center;">
                            <td>
                                <input class="common-input sort-input" name="sort[{$r.id}]" value="{$r.sort}" type="text">
                            </td>
                            <td>{$r.id}</td>
                            <th>{$r.title}</th>
                            <th>{$r.date|date="Y-m-d",###}</th>
                            <th>{$r.price}</th>
                            <td>
                                <a href="#"><span onclick="edit.click(this)" attr-id="{$r.id}" >编辑</span></a>
                                <a href="#"><span onclick="del.click(this)" attr-id="{$r.id}" attr-msg="删除" attr-a="ware">删除</span></a>
                            </td>
                        </tr>
                    {/volist}
                </table>
            </div>
            {$res->render()}
        </form>
    </div>
</div>
<script>
    var SCOPE = {
        'add_url' : '/admin.php/plane/planeadd',
        'edit_url' : '/admin.php/plane/planeedit',
        'set_status_url' : '/admin.php/plane/planesetStatus',
        'sort_url' : '/admin.php/plane/updateSort',
        'class_url' : '/admin.php/plane/lists',
    };

    $("#button").click(function(){
        var url = SCOPE.class_url;
        window.location.href = url;
    })

</script>
<!--/main-->
{include file="./public/bottom" /}